import axios  from "../../utils/request";

export const addFeedback = (data: { userId: number; message: string; category: string; orderId:number}) => {
  return axios({
    url: "http://localhost:8080/feedback/submit",
    method: "post",
    data
  });
};

export const getFeedbacks = (userId: number) => {
  return axios({
    url: `http://localhost:8080/feedback/history`,
    method: "get",
    params: {
      userId
    }
  });
}